-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Arm64 encodings for IF_SVE_CY_3A and IF_SVE_CY_3B group #96992
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThis group emits various compare instructions. This clr output matches the one from capstone.
Contribute towards #94549.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else LGTM.
case IF_SVE_CY_3A: // ........xx.iiiii ...gggnnnnn.DDDD -- SVE integer compare with signed immediate | ||
case IF_SVE_CY_3B: // ........xx.iiiii ii.gggnnnnn.DDDD -- SVE integer compare with unsigned immediate | ||
emitDispPredicateReg(id->idReg1(), PREDICATE_SIZED, id->idInsOpt(), true); // DDDD | ||
emitDispPredicateReg(id->idReg2(), PREDICATE_ZERO, id->idInsOpt(), true); // ggg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we should be using insGetPredicateType(fmt)
instead of PREDICATE_ZERO
.
But... on the previous line we would still need to do PREDICATE_SIZED
.
We could extend insGetPredicateType()
to have a an extra arg (reg position), which is ignored for most instructions.
Alternatively, we keep this PR as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we keep this PR as it is.
I agree. But we should have a follow up PR that calls insGetPredicateType()
instead of hard-coding even at other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. But we should have a follow up PR that calls
insGetPredicateType()
instead of hard-coding even at other places.
Done: #97142
@dotnet/arm64-contrib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -1072,8 +1072,28 @@ void emitter::emitInsSanityCheck(instrDesc* id) | |||
assert(insOptsScalableWide(id->idInsOpt())); // xx | |||
assert(isPredicateRegister(id->idReg1())); // DDDD | |||
assert(isLowPredicateRegister(id->idReg2())); // ggg | |||
assert(isVectorRegister(id->idReg3())); // mmmmm | |||
assert(isVectorRegister(id->idReg4())); // nnnnn | |||
assert(isVectorRegister(id->idReg3())); // nnnnn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
case IF_SVE_CY_3A: // ........xx.iiiii ...gggnnnnn.DDDD -- SVE integer compare with signed immediate | ||
case IF_SVE_CY_3B: // ........xx.iiiii ii.gggnnnnn.DDDD -- SVE integer compare with unsigned immediate | ||
emitDispPredicateReg(id->idReg1(), PREDICATE_SIZED, id->idInsOpt(), true); // DDDD | ||
emitDispPredicateReg(id->idReg2(), PREDICATE_ZERO, id->idInsOpt(), true); // ggg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we keep this PR as it is.
I agree. But we should have a follow up PR that calls insGetPredicateType()
instead of hard-coding even at other places.
…6992) * Add Arm64 encodings for IF_SVE_CY_3A and IF_SVE_CY_3B group * Fix function declaration --------- Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
This group emits various compare instructions.
This clr output matches the one from capstone.
Contribute towards #94549.